import { RouteComponent } from 'vue-router';

export interface MenuItemState {
  code: string;
  path: string;
  component: RouteComponent;
  name: string;
  title: string;
  icon: string;
}

/**菜单*/
export class MenuState {
  /**菜单激活选项*/
  default_active: string = '1000';
  /**菜单是否展开*/
  collapse: boolean = false;
  /**
   * 菜单列表
   * */
  list: MenuItemState[] = [
    {
      code: '1000',
      path: '/admin/home',
      name: 'admin-home',
      component: () => import('@/renderer/views/home/index.vue'),
      title: '首页',
      icon: 'home'
    },
    {
      code: '1001',
      path: '/admin/generic-http-receive-service',
      name: 'admin-generic-http-receive-service',
      component: () => import('@/renderer/views/generichttpreceiveservice/index.vue'),
      title: '通用的HTTP接收服务',
      icon: 'http'
    },
    {
      code: '1002',
      path: '/admin/file-to-base64',
      name: 'admin-file-to-base64',
      component: () => import('@/renderer/views/filetobase64/index.vue'),
      title: '任意文件转base64',
      icon: 'file-to-base64'
    },
    {
      code: '1003',
      path: '/admin/base64-to-file',
      name: 'admin-base64-to-file',
      component: () => import('@/renderer/views/base64tofile/index.vue'),
      title: 'base64还原成文件',
      icon: 'base64-to-file'
    },
    {
      code: '1004',
      path: '/admin/json-format',
      name: 'admin-json-format',
      component: () => import('@/renderer/views/jsonformat/index.vue'),
      title: 'JSON格式化',
      icon: 'json-format'
    },
    {
      code: '1005',
      path: '/admin/xml-format',
      name: 'admin-xml-format',
      component: () => import('@/renderer/views/xmlformat/index.vue'),
      title: 'XML格式化',
      icon: 'xml-format'
    },
    {
      code: '1006',
      path: '/admin/http-request',
      name: 'admin-http-request',
      component: () => import('@/renderer/views/httprequest/index.vue'),
      title: '发送HTTP请求',
      icon: 'http-request'
    }
  ];
}
